package com.xinqi.common.base.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 公共文件-传输对象,大家都用这个
 *
 * @author linkai
 * @date 2023/3/19
 */
@Data
@Schema(description = "公共文件-传输对象")
public class CommonFileDTO implements Serializable {

    @Schema(description = "名称名称", example = "课程")
    private String name;
    @Schema(description = "名称名称", example = "1530693162504.jpg")
    private String filename;

    @JsonProperty("fileurl")
    @Schema(name = "fileurl", description = "名称URL", example = "https://xinqiclass.oss-cn-hangzhou.aliyuncs.com/course/1679126299193325-1530693162504.jpg")
    private String fileUrl;

    @JsonProperty("ossFileName")
    @Schema(name = "ossFileName", description = "OSS对象名称", example = "course/1679126299193325-1530693162504.jpg")
    private String ossFilename;

    @Schema(description = "文件大小", example = "54384")
    private Long size;

    @Schema(description = "文件类型", example = "3")
    private Integer type;

    @Schema(description = "url", example = "https://xinqiclass.oss-cn-hangzhou.aliyuncs.com/course/1679126299193325-1530693162504.jpg")
    private String url;

    @Schema(description = "图片高度", example = "676")
    private Integer height;

    @Schema(description = "图片宽度", example = "676")
    private Integer width;

    @Schema(description = "时长", example = "12")
    private BigDecimal duration;

    private Float progress;

}
